import request from '@/utils/request'

// 查询合同签约管理列表
export function listContract(query) {
  return request({
    url: '/document/contract/list',
    method: 'get',
    params: query
  })
}

// 查询合同签约管理详细
export function getContract(conId) {
  return request({
    url: '/document/contract/' + conId,
    method: 'get'
  })
}
// 回滾方法
export function rollback() {
  return request({
    url: '/document/contract/',
    method: 'delete'
  })
}
// 新增合同签约管理
export function addContract(data) {
  return request({
    url: '/document/contract',
    method: 'post',
    data: data
  })
}

// 修改合同签约管理
export function updateContract(data) {
  return request({
    url: '/document/contract',
    method: 'put',
    data: data
  })
}
export function updateContractById(conId) {
  return request({
    url: '/document/contract/'+conId,
    method: 'put',
  })
}



// 删除合同签约管理
export function delContract(conId) {
  return request({
    url: '/document/contract/' + conId,
    method: 'delete'
  })
}

// 查看文件详情信息
export function getShowFile(conId) {
  return request({
    url: '/image/downloadShowFastDFS/' + conId,
    method: 'get'
  })
}

// 下载文件详情信息
export function downloadImage(conId) {
  return request({
    url: '/image/downloadFastDFS/' + conId,
    method: 'get'
  })
}
